#include "mythread.h"

MyThread::MyThread(QSerialPort *mycom)

{

    com = new QSerialPort;

    com = mycom;

    com->clear();

}

void MyThread::run()

{

    while(1){

        if(com->bytesAvailable()){

            emit comRecive();

        }

        this->msleep(500);

    }

}
